package com.platform.common.config;

import com.platform.common.handler.RealIpMethodArgumentResolver;
import com.platform.common.handler.UserSessionMethodArgumentResolver;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

/**
 * @author GH
 */
@Configuration
public class HttpArgumentResolverConfig implements WebMvcConfigurer {

    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
        argumentResolvers.add(new UserSessionMethodArgumentResolver());
        argumentResolvers.add(new RealIpMethodArgumentResolver());
    }
}
